/**
 * Created by Administrator on 2017/3/21.
 * 文章管理
 */
const  mongoose = require('mongoose'),
    shortid = require('shortid'),
    Schema = mongoose.Schema;

let articleSchema = new Schema({
    _id: {
        type: String,
        'default': shortid.generate
    },
    artid:String,
    arttype:String,
    arttitle:String,
    shorttitle:String,
    source:String,
    keyword: String,
    summay:String,
    content:String,
    author:String,
    readcount:String,
    sortid:String,
    deliver:String,
    audit:String,
    showflag:String,
    delivertime:String,
    register_time:{
        type: Date,
        "default": Date.now
    }
});

let article = mongoose.model('article', articleSchema);

module.exports = article;